<template>
	<div class="home">
		<Header></Header>
		<Swiper :swiperList='swiperList'></Swiper>
		<Nav></Nav>
		<QuickEntry :quickEntryList='quickEntryList'></QuickEntry>
		<Recommend :recommendList='recommendList'></Recommend>
	</div>
</template>
<script type="text/javascript">
	import Header from '../../base/header.vue'
	import Swiper from '../../base/swiper.vue'
	import Nav from '../../base/nav.vue'
	import QuickEntry from '../../base/quickentry.vue'
	import Recommend from '../../base/recommend.vue'

	export default{
		created(){
			this.getIndexData()
		},
		components:{
			Header,
			Swiper,
			Nav,
			QuickEntry,
			Recommend
		},
		data(){
			return{
				swiperList:[],
				quickEntryList:[],
				recommendList:[]
			}
		},
		methods:{
			getIndexData(){
				this.$axios.get('../../../static/mock/index.json')
						   .then((result)=>{
						   		if(result.data.ret===true){
						   			var dataList=result.data.data
						   			this.swiperList=dataList.swiperList
						   			this.quickEntryList=dataList.iconList
						   			this.recommendList=dataList.recommendList
						   		}
							})
			}
		},
	}
</script>
<style lang='less' scoped>
	.home{	
		padding-top: 50px;
		background: #f0f0f0;
	}
</style>